
public class ProjParams {
    String proj = "";
    int lat_0 = 121;
    int lon_0 = 32;
    double k = 1.0;
    double x_0 = 0;
    double y_0 = 0;
    String ellps = "";
    String units = "";

    /**
     * 构造函数
     *
     * @param lat_0 中央纬
     * @param proj  坐标类型 geos/proj线
     * @param lon_0 中央经线
     * @param k     常数
     * @param x_0   东偏
     * @param y_0   北偏
     * @param ellps 椭球体
     * @param units 单位
     */
    ProjParams(String proj, int lat_0, int lon_0, double k, double x_0, double y_0, String ellps, String units) {
        this.proj = proj;
        this.lat_0 = lat_0;
        this.lon_0 = lon_0;
        this.k = k;
        this.x_0 = x_0;
        this.y_0 = y_0;
        this.ellps = ellps;
        this.units = units;
    }

    public String getProjString() {
        StringBuilder builder = new StringBuilder();
        builder.append("+proj=" + this.proj);
        builder.append("+lat_0=" + this.lat_0);
        builder.append("+lon_0=" + this.lon_0);
        builder.append("+k=" + this.k);
        builder.append("+x_0=" + this.x_0);
        builder.append("+y_0=" + this.y_0);
        builder.append("+ellps=" + this.ellps);
        builder.append("+units=" + this.units);
        builder.append("+no_defs");
        return builder.toString();
    }
}


//export interface ProjParams {
//    proj?: string;
//    lat_0?: number;
//    lon_0?: number;
//    k?: number;
//    x_0: number;
//    y_0?: number;
//    ellps?: string;
//    units?: string;
//}
